<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        setTimeout(() => console.log(1), 0)
        async function main() {
            console.log('2')
            const test = () => {
                console.log('ddd')
                setTimeout(() => {
                    console.log('ffff')
                }, 0)
            }
            await test()       //await后面跟的不是Promise,await 会将其隐式转换为已解决的 Promise.resolve，‌但不会阻塞‌同步代码                
            console.log('3')
        }
        main()
        console.log('9999')
        Promise.resolve().then(() => console.log('4'))
    </script>
</body>

</html>